// common/businessConfig.js
export const businessModules = [
	// 1. 存款
	{
		b_id: 1.1,
		title: "个人储蓄存款",
		unit: "万元"
	},
	{
		b_id: 1.2,
		title: "对公存款",
		unit: "万元"
	},
	{
		b_id: 1.3,
		title: "其他存款",
		unit: "万元"
	},

	// 2. 贷款
	{
		b_id: 2.1,
		title: "小微企业抵押贷款",
		unit: "万元"
	},
	{
		b_id: 2.2,
		title: "农户经营贷款",
		unit: "万元"
	},
	{
		b_id: 2.3,
		title: "快贷",
		unit: "万元"
	},
	{
		b_id: 2.4,
		title: "房贷",
		unit: "万元"
	},
	{
		b_id: 2.5,
		title: "项目贷款",
		unit: "万元"
	},
	{
		b_id: 2.6,
		title: "公司信贷",
		unit: "万元"
	},

	// 3. 支付结算
	{
		b_id: 3.1,
		title: "传统结算",
		unit: "万元"
	},
	{
		b_id: 3.2,
		title: "电子支付",
		unit: "万元"
	},
	{
		b_id: 3.3,
		title: "收单",
		unit: "万元"
	},
	{
		b_id: 3.4,
		title: "对公结算",
		unit: "万元"
	},

	// 4. 代理业务
	{
		b_id: 4.1,
		title: "财政类代理",
		unit: "万元"
	},
	{
		b_id: 4.2,
		title: "保险类代理",
		unit: "万元"
	},
	{
		b_id: 4.3,
		title: "其他代理",
		unit: "万元"
	},

	// 5. 中间及扩展业务
	{
		b_id: 5.1,
		title: "银行卡增值服务",
		unit: "万元"
	},
	{
		b_id: 5.2,
		title: "理财服务",
		unit: "万元"
	},
	{
		b_id: 5.3,
		title: "信用服务",
		unit: "万元"
	},
	{
		b_id: 5.4,
		title: "贵金属",
		unit: "万元"
	},

	// 6. 走访相关
	{
		b_id: 6.1,
		title: "走访户数",
		unit: "户"
	}
];;


export const status_columns = [
	[{
		label: '未完成',
		id: 0
	}, {
		label: '已完成',
		id: 1
	}]
]
export const status_columns2 = [
	[{
		label: '未完成',
		id: 1
	}, {
		label: '已完成',
		id: 0
	}]
]
export const type_columns = [
	[{
			label: '文字记录',
			id: 1
		},
		{
			label: '上门拜访',
			id: 2
		},
		{
			label: '发微信',
			id: 3
		},
		{
			label: '打电话',
			id: 4
		},
		{
			label: '二维码预约',
			id: 5
		},
		{
			label: '发短信',
			id: 6
		},
		{
			label: '网点面谈',
			id: 7
		}
	]
]

export const type_columns2 = [
	[{
			label: '文字记录',
			id: 1
		},
		{
			label: '发微信',
			id: 2
		},
		{
			label: '打电话',
			id: 3
		},
		{
			label: '发短信',
			id: 4
		},
		{
			label: '发邮件',
			id: 5
		},
		{
			label: '拜访客户',
			id: 6
		},
	]
]

// 匹配单位
export const getCurrentUnit = (performanceName) => {
	// 匹配 id 等于 performanceName 的数据
	const matchedItem = businessModules.find(item => item.b_id == performanceName);
	if (matchedItem) {
		return matchedItem.unit || ' '
	}
};

// 审批结果
export const ApprovalResult = [
	'待审批', '通过', '驳回'
]